package com.dai.spec.common.enums;

/**
 * 课程周期枚举
 */
public enum CourseCycleType {
    EIGHT("0", "8周"),
    SIXTHEEN("1", "16周");

    private String code;
    private String value;

    CourseCycleType(String code, String value) {
        this.code = code;
        this.value = value;
    }

    public String getCode() {
        return code;
    }

    public String getValue() {
        return value;
    }
    public  static String getValueByCode(String code){
        for (CourseCycleType courseCycleEnum : CourseCycleType.values()) {
            if (courseCycleEnum.getCode().equals(code)){
                return courseCycleEnum.getValue();
            }
        }
        return null;
    }
}
